JavaScript::Packer - Perl version of Dean Edwards' Packer.js
Version 0.02
A JavaScript Compressor
This module does exactly the same as Dean Edwards' Packer.js
Take a look at http://dean.edwards.name/packer/
use JavaScript::Packer;
JavaScript::Packer::minify( $javascript, $opts );
First argument must be a scalarref of JavaScript-Code. Second argument must be a hashref of options. Possible options are
Defines compression level. Possible values are 'clean', 'shrink', 'obfuscate' and 'best'. Default value is 'clean'. 'best' uses 'shrink' or 'obfuscate' depending on which result is shorter. This is because short scripts will grow if compression level is 'obfuscate'.
For backward compatibility 'minify' and 'base62' will still work.
You can add a copyright notice on top of the script. The copyright notice will only be added if the compression value is 'clean'.
Merten Falk, <nevesenin at cpan.org>
<nevesenin at cpan.org>
Please report any bugs or feature requests to bug-javascript-packer at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=JavaScript-Packer. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-javascript-packer at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc JavaScript::Packer
Copyright 2009 Merten Falk, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install JavaScript::Packer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JavaScript::Packer
CPAN shell
perl -MCPAN -e shell install JavaScript::Packer
For more information on module installation, please visit the detailed CPAN module installation guide.